home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
newsgroups
/
misc.19990422-19990725
/
000147_news@watsun.cc.columbia.edu _Sat Jun 12 14:35:14 1999.msg
< prev
next >
Wrap
Internet Message Format
|
1999-07-23
|
3KB
Return-Path: <news@watsun.cc.columbia.edu>
Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id OAA21984
for <kermit.misc@watsun.cc.columbia.edu>; Sat, 12 Jun 1999 14:35:14 -0400 (EDT)
Received: (from news@localhost)
by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id OAA12520
for kermit.misc@watsun.cc.columbia.edu; Sat, 12 Jun 1999 14:15:29 -0400 (EDT)
X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
From: peter@baileynm.com (Peter da Silva)
Subject: Re: ISO VT320 emulator with key-bindings for Oracle Forms
Date: 12 Jun 1999 18:12:32 GMT
Organization: Bailey Network Management
Message-ID: <7ju7ug$nm8@web.nmti.com>
To: kermit.misc@watsun.cc.columbia.edu
In article <7jr6lr$4f1$1@newsmaster.cc.columbia.edu>,
Frank da Cruz <fdc@watsun.cc.columbia.edu> wrote:
>But again: in general, there is no API in UNIX to get the keycode of a
>keyboard event.
Assuming that's what you want, no. However there is an API in UNIX to
get a string of one or more characters that represent a keystroke, and
for non-pathological cases that's all you need.
After all, we ARE talking about a terminal emulator. Yes, you can get
escape sequences garbled over communication lines that don't maintain
time information. But there's two cases we need to consider here:
1. The terminal emulator is "close" to the keyboard.
Here, time information is preserved, the emulator can reliably
distinguish keystrokes. This is the case of a PC or a UNIX program
running on a console or in an X terminal.
2. The terminal emulator is far from the keyboard.
Here, it isn't. But remember that the other side of the terminal
emulator is also generating escape sequences that are subject to
the same problem... so a PC-based terminal emulator would have
the same trouble getting ITS escape sequences reliably recognised,
since it would have to run close to the keyboard and far from the
application.
The only case I can think of where there's a problem is if the input
escape sequence (from the keyboard to the emulator) is less reliably
recognised then the output one (from the emulator to the application),
or if the emulator is running on a significantly overloaded computer.
If you need to distinguish codes (like shift-alt-F7 versus alt-F7) that
the OS doesn't provide a hook for, then you have a problem, but this,
like the heavily overloaded computer, is a pretty pathological case.
After all, international PC keyboards give you bigger problems than this.
I haven't figured out how to generate a seperate "~" on some spanish
keyboards, for example.
--
In hoc signo hack, Peter da Silva <peter@baileynm.com>
`-_-' Ar rug t� barr�g ar do mhact�re inniu?
'U` "Be vewy vewy quiet...I'm hunting Jedi." -- Darth Fudd